﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace MS.TravelJourney.Final.ViewModels
{
    public class ItemViewModel : INotifyPropertyChanged
    {
        #region Members
        private string _name;
        /// <summary>
        /// 景点名称
        /// </summary>
        public string Name
        {
            get { return _name; }
            set { _name = value; NotifyPropertyChanged("Name"); }
        }
        private string _photo;
        /// <summary>
        /// 景点照片
        /// </summary>
        public string Photo
        {
            get { return _photo; }
            set { _photo = value; NotifyPropertyChanged("Photo"); }
        }
        /// <summary>
        /// 景点描述
        /// </summary>
        private string _desc;

        public string Desc
        {
            get { return _desc; }
            set { _desc = value; NotifyPropertyChanged("Desc"); }
        }
        #endregion

        #region INotifyProperty Members
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
        
    }
}